package cn.wolfcode.p2p.base.service.impl;

import cn.wolfcode.p2p.base.mapper.IpLogMapper;
import cn.wolfcode.p2p.base.service.IIpLogService;

import cn.wolfcode.p2p.base.domain.IpLog;

import java.util.List;

import cn.wolfcode.base.QueryObject;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class IpLogServiceImpl implements IIpLogService {
    @Autowired
    private IpLogMapper ipLogMapper;

    @Override
    @Transactional(readOnly = true)
    public PageInfo<IpLog> query(QueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
        List<IpLog> list = ipLogMapper.selectList(qo);
        return new PageInfo<IpLog>(list);
    }
}
